<include file="Public:header" /><include file="Public:navgation" />
<script>
	function makedatepicker(){
		var drp = $("#myDate").datepicker({
			language: 'cn',
			change:function onChange() {
                      alert(this.value());
                    },
			onSelect: function(dateText, inst) {
				alert(result);
				$.ajax({
					url: "__URL__/index",
					type:"post",
					data:{starttime:dateText},
					success:function(result){
						alert(result);
					},
					complete:function(result){
						alert(result);
					}
				});
			},
			dateFormat:'dd-mm-yyyy',  // 设置日期格式 
		})/*.bind(
			'click',
			function(selectedDate)
			{
				alert(selectedDate);
				//return false;
			}
		).bind(
			'dateSelected',
			function(e, selectedDate, $td)
			{
				alert(selectedDate);
			}
		)*/;
	}

	$(document).ready(function(e) {
		makedatepicker();
		$('.checkboxs').on('click',function(e){
			//e.preventDefault();
			if($(this).attr('checked'))
				$(this).attr('checked',false);
			else $(this).attr('checked',true)
			alert($(this).attr('checked'));
		});
		$('.one-or-more').on('click',function(e){
			//e.preventDefault();
			$.ajax({
				url: "__URL__/index",
					type:"post",
					data:{getall:'查看自己'},
					success:function(result){
						alert(result);
					},
					complete:function(result){
						alert(result);
					}
			});
		});
	});
	
	
</script>

<div class="container-fluid main-content">
  <div class="page-title"> </div>
  <div class="row">
    <div class="col-sm-3">
      <div class="widget-container fluid-height">
        <div class="widget-content">
          <div class="panel-group" id="accordion">
            <div class="panel">
              <div class="panel-heading">
                <div class="panel-title one-or-more"> <span>自己
                  <form action="__URL__/index" method="post" class="pull-right">
                    <input id="one-or-all-val" type="text" name="getall" value="{$getall[1]}" style="display: none;" class="btn btn-primary btn pull-right"/>
                    <input id="one-or-all" type="submit" value="{$getall[0]}" class="btn btn-primary btn pull-right"/>
                  </form>
                  </span> </div>
              </div>
            </div>
            <div class="panel">
              <div class="panel-heading">
                <div class="panel-title"> <a class="accordion-toggle" data-parent="#accordion" data-toggle="collapse" href="#collapseOne">
                  <div class="caret pull-right"></div>
                  日期</a> </div>
              </div>
              <div class="panel-collapse in" id="collapseOne" style="height: auto;">
                <div class="panel-body">
                  <div id="myDate" name="myDate"></div>
                </div>
              </div>
            </div>
            <div class="panel">
              <div class="panel-heading">
                <div class="panel-title"> <a class="accordion-toggle collapsed" data-parent="#accordion" data-toggle="collapse" href="#collapseTwo">
                  <div class="caret pull-right"></div>
                  <span>状态</span></a> </div>
              </div>
              <div class="panel-collapse in" id="collapseTwo" style="height: auto;">
                <div class="panel-body">
                  <label class="checkbox">
                    <input class="checkboxs" type="checkbox" value="">
                    <span>已完成</span></label>
                  <label class="checkbox">
                    <input class="checkboxs" type="checkbox" value="">
                    <span>未完成</span></label>
                </div>
              </div>
            </div>
            <div class="panel filter-categories">
              <div class="panel-heading">
                <div class="panel-title"> <a class="accordion-toggle collapsed" data-parent="#accordion" data-toggle="collapse" href="#collapseThree">
                  <div class="caret pull-right"></div>
                  部门</a> </div>
              </div>
              <div class="panel-collapse collapse in" id="collapseThree">
                <div class="panel-body">
                  <div class="btn-group" data-toggle="buttons">
                    <label class="btn btn-block btn-info-outline active"><i class="icon-stethoscope"></i>医疗
                      <input id="option1" name="options" type="checkbox">
                    </label>
                    <label class="btn btn-block btn-success-outline"><i class="icon-coffee"></i>饮食
                      <input id="option2" name="options" type="checkbox">
                    </label>
                    <label class="btn btn-block btn-warning-outline"><i class="icon-gamepad"></i>游戏
                      <input id="option3" name="options" type="checkbox">
                    </label>
                    <label class="btn btn-block btn-danger-outline"><i class="icon-gift"></i>礼品
                      <input id="option4" name="options" type="checkbox">
                    </label>
                    <label class="btn btn-block btn-magenta-outline"><i class="icon-trophy"></i>健身
                      <input id="option5" name="options" type="checkbox">
                    </label>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="col-sm-9">
      <div class="widget-container fluid-height"> 
        <!-- Table -->
        <table id="datatable-editable" class="table table-striped table-bordered dataTable">
          <thead>
            <tr>
              <th class="hidden-xs minwidth55">部门</th>
              <th class="minwidth55">姓名</th>
              <th>标题</th>
              <th class="maxwidth60">状态</th>
              <th class="hidden-xs">开始时间</th>
              <th class="hidden-xs">结束时间</th>
              <th class="minwidth64"></th>
            </tr>
          </thead>
          <volist name="list" id="vo" empty="$empty">
            <tr class="data_list {$key}">
              <td class="hidden-xs">{$vo.groupname}</td>
              <td>{$vo.name}</td>
              <td>{$vo.title}</td>
              <td><eq name="vo['status']" value="1"><span class="label label-success">已完成</span></eq>
                <eq name="vo['status']" value="3"><span class="label label-warning">未完成</span></eq></td>
              <td class=" hidden-xs">{:date('Y-m-d H:i:s',$vo['starttime'])}</td>
              <td class=" hidden-xs">{:date('Y-m-d H:i:s',$vo['endtime'])}</td>
              <td class="text-center actions"><a class="table-actions fancybox" data-start='{:date("Y-m-d H:i:s",$vo["starttime"])}' data-end='{:date("Y-m-d H:i:s",$vo["endtime"])}'  data-id='{$vo['id']}' href="#fancybox"><i class="icon-eye-open"></i></a>
                <eq name="vo['member_id']" value="$userInfo['id']">
                  <if condition="getAccessMenu($accessList, 'Intesys', 'Info_plan', 'delete')"> <a class="table-actions delete-row" href="{:U('delete',array('id'=>$vo['id']))}" row="{$key}"><i class="icon-trash text-danger"></i></a> </if>
                  <eq name="vo['status']" value="3">
                    <if condition="getAccessMenu($accessList, 'Intesys', 'Info_plan', 'update')"> <a class="table-actions update f-fillwidth" data-id='{$vo['id']}' href="{:U('update',array('id'=>$vo['id']))}"><i class="icon-pencil"></i></a> <a class="table-actions success"  href="{:U('update',array('id'=>$vo['id'],'statu'=>1))}"><i class="icon-ok text-success"></i></a> </if>
                  </eq>
                </eq></td>
            </tr>
          </volist>
        </table>
      </div>
      <div class="btn btn-lg btn-default-outline btn-block"> 加载更多 </div>
    </div>
  </div>
</div>
<include file="Public:footer" /> 